str1=str2=str3=''
strr1=strr2=strr3=''
flag = 0
f1 = open(r'C:\Users\Administrator\Desktop\record.txt')
for i in f1:
    if i[:2] == '==':
        flag +=1
        while 1:
            if flag == 0:
                if i[:4] =='小甲鱼':
                    str1=str1+i[5:]
                    break
                else :
                    strr1 = strr1+i[5:]
                    break
            elif flag == 1:
                if i[:4] =='小甲鱼':
                    str2=str2+i[5:]
                    break
                else :
                    strr2 = strr2+i[5:]
                    break
            elif flag == 2:
                if i[:4] =='小甲鱼':
                    str3=str3+i[5:]
                    break
                else :
                    strr3 = strr3+i[5:]
                    break
f2 = open(r'C:\Users\Administrator\Desktop\boy_1.txt','x')
f2.write(str1)
f3 = open(r'C:\Users\Administrator\Desktop\boy_2.txt','x')
f2.write(str2)
f4 = open(r'C:\Users\Administrator\Desktop\boy_3.txt','x')
f4.write(str3)
f5 = open(r'C:\Users\Administrator\Desktop\girl_1.txt','x')
f5.write(strr1)
f6 = open(r'C:\Users\Administrator\Desktop\girl_2.txt','x')
f6.write(strr2)
f7 = open(r'C:\Users\Administrator\Desktop\girl_3.txt','x')
f7.write(strr3)
f1.close()
f2.close()
f3.close()
f4.close()
f5.close()
f6.close()
f7.close()

